package com.ckh.springboot.entity;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author ckh
 * @since 2022-04-04
 */
@Data
@TableName("sys_user")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * Description: a
     * 姓名
     * @author: luoCan
     */
    private String name;

    /**
     * Description: a
     * 密码
     * @author: luoCan
     */
    private String password;

    /**
     * Description: a
     * 创建时间
     * @author: luoCan
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime = new Date();

    /**
     * Description: a
     * 身份 0 学生  1老师
     * @author: luoCan
     */
    private String identity;

    /**
     * Description: a
     * 学号
     * @author: luoCan
     */
    private String studentId;

    /**
     * Description: a
     * 打卡ID
     * @author: luoCan
     */
    @TableField(exist = false)
    private Integer clockId;

    /**
     * Description: a
     * 打卡时间
     * @author: luoCan
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(exist = false)
    private Date clockTime;

}
